package com.fary;

import com.fary.entity.Course;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

public class TestSpringFramework {

	public static void main(String[] args) throws Exception {
		String location = "beans1.xml";
		Resource resource = new ClassPathResource(location);
		BeanFactory beanFactory = new XmlBeanFactory(resource);


		Object demoService = beanFactory.getBean("demoService");
		System.out.println(demoService);

	}

}
